package com.gsn.engine.utility;

import java.io.File;

import com.badlogic.gdx.scenes.scene2d.Group;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.TextField;

public interface IUtility {
	public static interface IPictureDownloadListener {
		void onError(Exception e);

		void onFinishLoading(String id, File outFile);
	}

	public static interface IInputText {
		void onFinishLoading(String outText);
	}

	void runOnUiThread(Runnable method);

	void setActivity(Object activity);

	void showProgressDialog(String title, String msg);

	void hideProgressDialog();

	void downloadPictureAsync(final String id, final String link, final int width, final int height, final String localPath, final IPictureDownloadListener listener);

	void toast(String toast, boolean shortTime);

	void showInputTextDlg(String inText, String outDefaultText, IInputText listener);

	void toastException(String msg, Exception ex);

	// ----------------------------------------------------------------------------------------------------

	void makeTextFieldWithScreenCoordinate(Stage stage, TextField.TextFieldStyle style, String type, String content, float wide, float height, float marginTop, float marginLeft);

	void hideTextField(String type);

	String getString(String type);

	void visibleTextField(String type);
	void setTextField(String type, String content);

	// ------------------------------------------------------------------------------

	void save();

	void saveSetting();

	void load();

	void remove();
	
	void inviteFriend();
	
	void register();

	void endActivity();
}
